package com.tdkj.action.backstage.user;
import javax.annotation.Resource;

import com.tdkj.action.BaseAction;
import com.tdkj.service.user.IBeanAdminService;

public class UserMainAction extends BaseAction {
	private static final long serialVersionUID = -1567658750610254290L;
	private IBeanAdminService adminService;
	private String adminName;
	private String adminPassword;
	public String getAdminName() {
		return adminName;
	}

	public void setAdminName(String adminName) {
		this.adminName = adminName;
	}

	public String getAdminPassword() {
		return adminPassword;
	}

	public void setAdminPassword(String adminPassword) {
		this.adminPassword = adminPassword;
	}

	@Resource
	public void setAdminService(IBeanAdminService adminService) {
		this.adminService = adminService;
	} 
	
	//获取登录界面
	public String getLogin(){
		//exchangeRateService.updateGold(1L, value);
		return "login";
	}
	public String validateAdmin(){
		String name=this.getAdminName();
		String password=this.getAdminPassword();
		//添加校验
		if(password.equals("123")){
			return "index";
		}else{
			return getLogin();
		}
	}
}
